/**
 * Copyright &copy; 2016 CNJSON All rights reserved.
 */
package com.hongsuan.pplive.modules.live.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.cnjson.db.persistence.CrudDao;
import com.cnjson.db.persistence.annotation.MyBatisDao;
import com.hongsuan.pplive.modules.live.entity.LiveRoom;

/**
 * 单表生成DAO接口
 * 
 * @author cgli
 * @version 2016-04-18
 */
@MyBatisDao
public interface LiveRoomDao extends CrudDao<LiveRoom> {

	public LiveRoom getByOwner(@Param("owner")String owner);

	public void join(@Param("roomId") String roomId, @Param("userId") String userId);

	public void leave(@Param("roomId") String roomId, @Param("userId") String userId);
	
	public void clean();

	public List<LiveRoom> getByUserIds(@Param("userIds")String userIds);

	public void updateStateByUsers(@Param("userIds")String userIds);

}